<?php
use App\Controllers\AppController;
use App\Controllers\SmsController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/


//支付宝回调
Route::any('notify/alipay', [\App\Controllers\PayController::class, 'alipayNotify'])->name('alipay.notify');
//微信支付回调
Route::any('notify/wechat', [\App\Controllers\PayController::class, 'wechatNotify'])->name('wechat.notify');
//小程序登录
Route::post('minlogin', [\App\Controllers\AuthController::class, 'minlogin']);

Route::get('getMemberList', [\App\Controllers\MemberController::class, 'getMemberInfo']);

Route::get('app_info', [AppController::class, 'app_info']);
Route::get('get_app_version', [AppController::class, 'checkVersion']);  //获取最新版本

Route::get('get_sms_code', [SmsController::class, 'get_sms']);
Route::post('send_sms_code', [SmsController::class, 'send_sms']);

Route::post('resetPassword', [\App\Controllers\UserController::class, 'forgetLoginPassword']); //忘记登录密码
// 获取短信验证码
Route::post('getVerifyCode', [SmsController::class, 'getVerifyCode']);
// 注册
Route::post('register', [\App\Controllers\UserController::class, 'register']);
// 登录
Route::post('login', [\App\Controllers\LoginController::class, 'login']);
Route::post('codeLogin', [\App\Controllers\LoginController::class, 'codeLogin']);
